﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eCommerce.DataAccess
{
    public class NewsletterDA
    {
        private WebsiteDataContext dataBase = new WebsiteDataContext();
        /// <summary>
        /// Gets the newsletter fields.
        /// </summary>
        /// <returns></returns>
        public Xcms_Subscriber GetSubscriber(string userEmail,string userName)
        {
            var subscribers = from s in dataBase.Xcms_Subscribers
                              where s.email == userEmail  
                              select s;

            return subscribers.FirstOrDefault();
        }
    }

   
}
